package com.zkthink.ceres.finance.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zkthink.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

import static com.zkthink.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

/**
 * <p>
 * 实体类
 * 会员提现明细表
 * </p>
 *
 * @author chenke
 * @since 2020-05-26
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ceres_member_cash_out_detail")
@ApiModel(value = "MemberCashOutDetail", description = "会员提现明细表")
@AllArgsConstructor
public class MemberCashOutDetail extends Entity<Long> {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("会员id")
    @TableField("mid")
    private Long mid;

    /**
     * 提现金额
     */
    @ApiModelProperty(value = "提现金额")
    @TableField("amount")
    @Excel(name = "提现金额")
    private Long amount;

    /**
     * 提现状态 0:提现失败,1:提现成功
     */
    @ApiModelProperty(value = "提现状态 0:提现失败,1:提现成功")
    @TableField("cash_out_status")
    @Excel(name = "提现状态 0:提现失败,1:提现成功")
    private Integer cashOutStatus;

    /**
     * 审核状态 0:待处理,1:已处理
     */
    @ApiModelProperty(value = "审核状态 0:待处理,1:已处理")
    @TableField("audit_status")
    @Excel(name = "审核状态 0:待处理,1:已处理")
    private Integer auditStatus;

    /**
     * 提现帐户id
     */
    @ApiModelProperty(value = "提现帐户id")
    @TableField("collecting_account_id")
    @Excel(name = "提现帐户id")
    private Long collectingAccountId;

    /**
     * 提现申请时间
     */
    @ApiModelProperty(value = "提现申请时间")
    @TableField("apply_time")
    @Excel(name = "提现申请时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime applyTime;

    /**
     * 提现确认时间
     */
    @ApiModelProperty(value = "提现确认时间")
    @TableField("audit_time")
    @Excel(name = "提现确认时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime auditTime;


    @Builder
    public MemberCashOutDetail(Long id, Long createUser, LocalDateTime createTime, Long updateUser, LocalDateTime updateTime,
                               Long mid, Long amount, Integer cashOutStatus, Integer auditStatus, Long collectingAccountId, LocalDateTime applyTime, LocalDateTime auditTime) {
        this.id = id;
        this.createUser = createUser;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.updateTime = updateTime;
        this.amount = amount;
        this.cashOutStatus = cashOutStatus;
        this.auditStatus = auditStatus;
        this.collectingAccountId = collectingAccountId;
        this.applyTime = applyTime;
        this.auditTime = auditTime;
        this.mid = mid;
    }
}
